package com.lh.user.controller;

import com.lh.common.domain.User;
import com.lh.common.result.Result;
import com.lh.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName：UserController
 * @Author: LeiHao
 * @Date: 2024/8/9 14:20
 * @Description: User控制层
 * @Version: 1.0
 */
@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    /* *
     * @Title: selectUserPhone
     * @Author: DELL
     * @Date: 2024-08-09 14:26:24
     * @Params: [userPhone]
     * @Return: Result<User>
     * @Description: 手机号查询用户信息
     */
    @GetMapping("/{userPhone}")
    public Result<User> selectUserPhone(@PathVariable String userPhone) {
        return Result.success(userService.selectUserPhone(userPhone));
    }
}
